<?php
/**
 * Created by PhpStorm.
 * User: Steven
 * Date: 2017/5/24
 */

namespace app\jiaxiaotong\validate;


use think\Validate;

class StudentAddValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'birthday' => 'require|date',
        'gender' => 'require|gt:0',
        'school_name' => 'require',
        'grade'=>'require'
    ];

    protected $message = [
        'name.require' => '学生姓名不能为空',
        'birthday.require' => '学生生日不能为空',
        'birthday.date' => '生日日期格式不对',
        'gender.require' => '学生性别不能为空',
        'school_name.require' => '学校名称不能为空',
        'grade' => '学生年级不能为空',
        'gender.gt' => '请选择孩子性别'
    ];
}